#ifndef ROMFILE_H
#define ROMFILE_H
#include<string>
using namespace std;
class romfile {
public:
    romfile(string filename);
    int filesize;
    const unsigned char * contents;
    int mapper; //0: none, 1: MBC1, 2: MBC2, 3: MMM01, 4: MBC3, 5: MBC5, 6: Pocket Camera, 7: Bandai TAMA5, 8: Hudson HuC-3, 9: Hudson HuC-1
    bool ram, batt, rumble, sram, timer;
    char * title;
    bool color, sgb_support;
    int rom_banks, ram_banks;
    bool isvalid();
private:
    bool load(string filename);
    void print_info();
    void fill_info();
    bool valid;
    int cart_type;
};
#endif
